const { Game } = require('board-game');
const extend = require('extend');

const {game: gameConfig} = require('./config');

class MazeGame extends Game {
    constructor(server, room) {
        super(server, room);
    }

    start() {
        if (super.start()) {
            this.board.start();
            return true;
        } else {
            return false;
        }
    }

    over(groupIndex = -1) {
        this.groups.forEach(group => group.clearShown());
        this.board.over();
        super.over(groupIndex);
    }
}

module.exports = MazeGame;